pkg=puppet
if dpkg --get-selections | grep -q "^$pkg[[:space:]]*install$" >/dev/null; then
#if (dpkg -s "puppet" >/dev/null 2>&1); then
        echo "$pkg is installed."
else
        echo "$pkg is not installed."
fi
